package com.woniu.adminservice.dao;

import com.woniu.adminservice.dto.AdminDTO;
import com.woniu.adminservice.entity.Account;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AccountDao {
    Account queryById(Integer id);

    List<Account> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
    
    List<Account> findAll();

    List<Account> queryAll(Account account);

    int insert(Account account);

    int update(Account account);

    int deleteById(Integer id);

    List<Account> findAllByPage(@Param("currentPage") Integer currentPage, @Param("pageSize") Integer pageSize);

    @Select("select * from account where account = #{value}")
    Account selectByUseName(String userName);
}